'\" te
'\"! tbl|eqn | mmdoc
'\"macro stdmacro
.ds Vn Version 1.2
.ds Dt 24 September 1999
.ds Re Release 1.2.1
.ds Dp Jan 14 18:30
.ds Dm 01 texcoordp
.ds Xs 65158 7 texcoordpointer.gl
.TH GLTEXCOORDPOINTER 3G
.SH NAME
.B "glTexCoordPointer
\- define an array of texture coordinates

.SH C SPECIFICATION
void \f3glTexCoordPointer\fP(
GLint \fIsize\fP,
.nf
.ta \w'\f3void \fPglTexCoordPointer( 'u
	GLenum \fItype\fP,
	GLsizei \fIstride\fP,
	const GLvoid \fI*ptr\fP )
.fi

.EQ
delim $$
.EN
.SH PARAMETERS
.TP \w'\fIstride\fP\ \ 'u 
\f2size\fP
Specifies the number of coordinates per array element. Must be 1, 2, 3
or 4. The initial value is 4.
.TP
\f2type\fP
Specifies the data type of each texture coordinate.
Symbolic constants
\%\f3GL_SHORT\fP,
\%\f3GL_INT\fP,
\%\f3GL_FLOAT\fP,
or \%\f3GL_DOUBLE\fP
are accepted. The initial value is \%\f3GL_FLOAT\fP.
.TP
\f2stride\fP
Specifies the byte offset between consecutive array elements.
If \f2stride\fP is 0, the array elements are understood 
to be tightly packed. The initial value is 0.
.TP
\f2ptr\fP
Specifies a pointer to the first coordinate of the first element in the 
array.  The initial value is 0.
.SH DESCRIPTION
\%\f3glTexCoordPointer\fP specifies the location and data  of an array of texture
coordinates to use when rendering.
\f2size\fP specifies the number of coordinates per
element, and must be 1, 2, 3, or 4.
\f2type\fP specifies the data type of each texture coordinate
and \f2stride\fP specifies the byte stride from one
array element to the next allowing vertices and attributes
to be packed into a single array or stored in separate arrays.
(Single-array storage may be more efficient on some implementations;
see 
.br
\%\f3glInterleavedArrays\fP.)
When a texture
coordinate array is specified, \f2size\fP, \f2type\fP, \f2stride\fP, and \f2ptr\fP
are saved client-side state. 
.P
To enable and disable the texture coordinate array, call 
\%\f3glEnableClientState\fP and \%\f3glDisableClientState\fP with the argument
\%\f3GL_TEXTURE_COORD_ARRAY\fP. If 
enabled, the texture coordinate array is used
when \%\f3glDrawArrays\fP, \%\f3glDrawElements\fP, \%\f3glDrawRangeElements\fP or 
\%\f3glArrayElement\fP is called.
.P
Use \%\f3glDrawArrays\fP to construct a sequence of primitives (all of the
same type) from prespecified vertex and vertex attribute arrays.
Use \%\f3glArrayElement\fP to specify primitives
by indexing vertices and vertex attributes and \%\f3glDrawElements\fP to
construct a sequence of primitives by indexing vertices and vertex attributes.
.SH NOTES
\%\f3glTexCoordPointer\fP is available only if the GL version is 1.1 or greater.
.P
The texture coordinate array is initially disabled and it won't be
accessed when 
\%\f3glArrayElement\fP, \%\f3glDrawElements\fP, \%\f3glDrawRangeElements\fP, or
\%\f3glDrawArrays\fP is called. 
.P
Execution of \%\f3glTexCoordPointer\fP is not allowed between the execution of
\%\f3glBegin\fP and the corresponding execution of \%\f3glEnd\fP,
but an error may or may not be generated. If no error is generated,
the operation is undefined.
.P
\%\f3glTexCoordPointer\fP is typically implemented on the client side with no protocol.
.P
The texture coordinate array parameters are client-side state and are
therefore not saved or restored by \%\f3glPushAttrib\fP and \%\f3glPopAttrib\fP.
Use \%\f3glPushClientAttrib\fP and 
\%\f3glPopClientAttrib\fP instead.
.P
When the \%\f3GL_ARB_imaging\fP extension is supported, \%\f3glTexCoordPointer\fP updates the
texture coordinate array state of the active client texture unit,
specified with \%\f3glClientActiveTextureARB\fP.
.SH ERRORS
\%\f3GL_INVALID_VALUE\fP is generated if \f2size\fP is not 1, 2, 3, or 4.
.P
\%\f3GL_INVALID_ENUM\fP is generated if \f2type\fP is not an accepted value.
.P
\%\f3GL_INVALID_VALUE\fP is generated if \f2stride\fP is negative.
.SH ASSOCIATED GETS  
\%\f3glIsEnabled\fP with argument \%\f3GL_TEXTURE_COORD_ARRAY\fP
.br
\%\f3glGet\fP with argument \%\f3GL_TEXTURE_COORD_ARRAY_SIZE\fP
.br
\%\f3glGet\fP with argument \%\f3GL_TEXTURE_COORD_ARRAY_TYPE\fP
.br
\%\f3glGetPointerv\fP with argument \%\f3GL_TEXTURE_COORD_ARRAY_POINTER\fP
.SH SEE ALSO 
\%\f3glArrayElement(3G)\fP,
\%\f3glClientActiveTextureARB(3G)\fP,
\%\f3glColorPointer(3G)\fP,
\%\f3glDrawArrays(3G)\fP,
\%\f3glDrawElements(3G)\fP,
\%\f3glDrawRangeElements(3G)\fP,
\%\f3glEdgeFlagPointer(3G)\fP,
\%\f3glEnable(3G)\fP,
\%\f3glGetPointerv(3G)\fP,
\%\f3glIndexPointer(3G)\fP,
\%\f3glNormalPointer(3G)\fP,
\%\f3glPopClientAttrib(3G)\fP,
\%\f3glPushClientAttrib(3G)\fP,
\%\f3glTexCoord(3G)\fP,
\%\f3glVertexPointer(3G)\fP
